<?php

namespace App\Library\Requests\Product;

use App\Library\Requests\Base\SerialNumberRequest;
use App\Library\Rules\SerialNumbersRule;

class ProductStatusRequest extends SerialNumberRequest
{
    public function rules(): array
    {
        return array_merge(parent::rules(), [
            'serialNumberArr' => ['nullable', 'array', new SerialNumbersRule, 'required_with:productStatus'],
            'productStatus' => 'nullable|required_with:serialNumberArr|integer|in:1,2'
        ]);
    }
}
